import React from 'react';
import { connect } from 'react-redux';
import { editInfo, showErrmsg, openAvatar } from '../../store/user';
import EditInfo from '../../components/user/EditInfo';

const mapStateToProps = state => ({
  userInfo: state.user.userInfo,
  loading: state.user.loading,
  errMsg: state.user.errMsg
});

const mapDispatchToProps = {
  editInfo,
  showErrmsg,
  openAvatar
};
export default connect(
  mapStateToProps,
  mapDispatchToProps
)(EditInfo);
